package me.zhengjie.config.enums;

public enum AgeTypeEnum {

    PERSON("1","成人"),

    CHILD("2","儿童")

    ;

    AgeTypeEnum(String code, String atmr) {
        this.code = code;
        this.desc = atmr;
    }

    public static AgeTypeEnum get(String code){
        AgeTypeEnum[] list = AgeTypeEnum.values();
        for (AgeTypeEnum typeEnum : list) {
            if(typeEnum.getCode().equals(code)){
                return typeEnum;
            }
        }
        return null;
    }

    private String code;
    private String desc;

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

}
